<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
    request.setAttribute("contextPath", request.getContextPath());
%>
<html>
<script>
function check(obj)
{

    if(obj.value.length==0)
	{
	alert("can't be empty");
	obj.focus();
	}
}
</script>
<head>
<title>编辑用户信息</title>
</head>
<body>
  <form action="${contextPath }/profile/update" method="post">
	   <input type="hidden" value="${user.userId }" name="userId"/>
	   
	   <table width="80%" border="1">
			
			<tr>
	            <td>loginName</td>
	            <td><input type="text" value="${user.loginName }" name="loginName" onblur="check(this)"/></td>
	        </tr>
	        <tr>
	            <td>userName</td>
	            <td><input type="text" value="${user.userName }" name="userName" onblur="check(this)"/></td>
	        </tr>
	        <tr>
	            <td>password</td>
	            <td><input type="text" value="${user.password }" name="password" onblur="check(this)"/></td>
	        </tr>
		    <tr>
		        <td>email</td>
		        <td><input type="text" value="${user.email}" name="email" onblur="check(this)"/></td>
		    </tr>
		</table>
		<br/>
        <input type="submit" value="Update"/>
        <input type="reset" value="Reset"/>
	</form>
  
</body>
</html>